<!DOCTYPE html>
<html lang="Zh-cn">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>标签管理</title>
<link rel="stylesheet" href="./css/normalize.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/tag.min.css">
</head>
<body>
<!-- 顶部导航 -->

<!-- 顶部导航 -->
<div class="container">
<div class="row">
    <span>TGA标签管理</span>
    <hr>

</div>
<div class="row">
    <form action="" class="form-inline">
        <div class="col-md-10">
<input type="text" name="" id="" class="form-control">
        </div>
        <div class="col-md-2">
<button class="btn btn-default">添加</button>
        </div>
    </form>
</div>

<div class="row">
<div class="col-xs-12">

</div>
</div>
</div>

<script src="./js/jquery.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script>
    $(function(){

        $.ajax({
            url:"http://localhost:3000/tag",
            type:"GET",
            success:function(res) {
                if(res.status===200){
                 const data =  res.data;
                 let html ="";
              for (let index = 0; index < data.length; index++) {
                  const element = data[index];
                  html +=element.text + "&nbsp;&nbsp;";
                }

                  $(".col-xs-12").html(html);
              }
                
                console.log(res);
            },
            error:function(err) {
      console.log(err);
            }
        })
    })
</script>
</body>
</html>